using System;
using Cmpp.Client.Cmpp3Message.Utility;

namespace Cmpp.Client.Cmpp3Message {
    public abstract class Cmpp3Response {
        private readonly byte[] m_data;
        private readonly Cmpp3Header m_header;

        protected Cmpp3Response(CmppMessageReader reader) {
            m_data = reader.GetBytes();
            m_header = new Cmpp3Header(reader);
        }

        public Cmpp3Header Header {
            get {
                return m_header;
            }
        }

        public override string ToString() {
            return BitConverter.ToString(m_data, 0, m_data.Length);
        }
    }
}